package com.labreeze.spring.ioc;

import java.util.List;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.Resource;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.core.io.support.ResourcePatternResolver;

import com.labreeze.spring.pojo.Boss;
import com.labreeze.spring.pojo.Car;



/**
 * 	测试命名空间 p  util
 * @author fesco
 * 	
 */
public class TestCar {

	public static void main(String[] args) {
		
		ResourcePatternResolver resolver=new PathMatchingResourcePatternResolver();
		Resource res=resolver.getResource("classpath:applicationContext.xml");
		
		BeanFactory bf=new XmlBeanFactory(res);
		Car car=(Car)bf.getBean("car");
		System.out.println(car.toString());
		
		Boss boss=(Boss)bf.getBean("boss");
		System.out.println(boss.toString());
		
		List list=(List)bf.getBean("mylist");
		System.out.println(list.toString());
	}
	
}
